Conventionally, various methods have been used for data backup of image forming devices or the like at a time of power failure. A first method is provided to back up data at the time of power failure by simultaneously using an uninterruptible power supply (UPS) and a commercial power supply. A second method is provided to perform processing for recovery by switching an AC power supply on and off by a relay based on an on/off signal of a power switch without turning off the AC power supply by the power switch, and providing a time difference between an operation of the power switch and an operating timing of the relay.
The first method (the case of using the UPS), however, cannot cope with a case where the power switch is turned off during the operation. The second method (the case where a time difference is provided between the operation of the power switch and the operating timing of the relay) cannot also cope with a case where the AC power supply itself goes off due to power failure or the like. Further, factors in that the AC power supply goes off include cases where instantaneous power failure of the commercial power supply occurs, a power cord is erroneously disconnected, or an operator erroneously turns off the power switch during operation. For example, when the AC power supply is off while data is being written in a hard disk, the data may be corrupted.